import sys
import urllib

from flask import Flask, request,render_template,jsonify
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime, timedelta
# pip install flask-migrate
from flask_migrate import Migrate
import json
import os
import time  # 用于生成当前时间戳
import requests
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.cron import CronTrigger
import random


def setTimeTampToFormatTime(timeTamp):
    """
    将时间戳转换为格式化时间
    :param timeTamp: 时间戳
    :return: 格式化时间
    """
    timeTamp=int(timeTamp)
    dt_object = datetime.fromtimestamp(timeTamp)
    formatted_time = dt_object.strftime('%Y%m%d %H%M%S') #20241227 171400
    return formatted_time

strTime=1735822800
a= setTimeTampToFormatTime(strTime)[-4:-2]


if __name__ == '__main__':
    print(a)